// pages/goodscore/goodscore.js
Page({

  data: {
    total: 5,//总体评价
    dealid:null
  },
  img_bind: function(event) {
    var id = event.currentTarget.dataset.item + 1;
    var variable = event.currentTarget.dataset.name;
    console.log(id)
    console.log(variable)
    if (variable == "total")
    this.setData({
      total: id,
    })
  },

   total:function(e){
   this.setData({
  total:e.detail.value
})
   },

   submit:function(e){
    wx.request({
      url:app.globalData.url+'userLoginAction',
       data:{
         dealScore:this.data.total,
         dealId:2,
       },
       success(e){
       wx.showToast({
         title: '发布成功',
         icon:'none'
       })
       wx.reLaunch({
        url: '',
      })
    }
})
},
onLoad: function (options) {//数据在options对象身上
  var that=this
	this.setData({//这里必须使用setDate
      dealid:options.dealid
    })
    console.log(dealid)
  },



})